package eight.test_8_10;

import java.util.Scanner;

public class TestMain12 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t = scanner.nextInt();
        for (int i = 0; i < t; i++) {
            int n = scanner.nextInt();
            int k = scanner.nextInt();
            int x = scanner.nextInt();
            int mink = n;
            long min = Integer.MAX_VALUE;
            int[] arr = new int[n];
            long count = 0;
            for (int j = 0; j < arr.length; j++) {
                long tmp = 0;
                count += x;
                arr[j] = scanner.nextInt();
                if(arr[j] < mink) {
                    mink = arr[j];
                } else if((n - j) == mink){
                    mink = n - j;
                }
                tmp = mink * k + count;
                min = Math.min(tmp,min);
            }
            min = Math.max(min,n * k);
            System.out.println(min);
        }
    }
}
